home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / difutl27.zip / difutl27 / Makefile.in < prev    next >
Makefile  |  1994-09-22  |  5KB  |  199 lines

  1. # Makefile for GNU DIFF
  2. # Copyright (C) 1988,1989,1991,1992,1993,1994 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU DIFF.
  5. #
  6. # GNU DIFF is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # GNU DIFF is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with GNU DIFF; see the file COPYING.  If not, write to
  18. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. #### Start of system configuration section. ####
  21.  
  22. srcdir = @srcdir@
  23. VPATH = @srcdir@
  24.  
  25. CC = @CC@
  26. INSTALL = @INSTALL@
  27. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  28. INSTALL_DATA = @INSTALL_DATA@
  29. MAKEINFO = makeinfo
  30. TEXI2DVI = texi2dvi
  31.  
  32. CPPFLAGS = @CPPFLAGS@
  33. DEFS = @DEFS@
  34. CFLAGS = @CFLAGS@
  35. LDFLAGS = @LDFLAGS@
  36. LIBS = @LIBS@
  37. LIBOBJS = @LIBOBJS@
  38.  
  39. # Some System V machines do not come with libPW.
  40. # If this is true for you, use the GNU alloca.o here.
  41. ALLOCA = @ALLOCA@
  42.  
  43. prefix = @prefix@
  44. exec_prefix = @exec_prefix@
  45. edit_program_name = sed '@program_transform_name@'
  46.  
  47. bindir = $(exec_prefix)/bin
  48.  
  49. infodir = $(prefix)/info
  50.  
  51. DEFAULT_EDITOR_PROGRAM = ed
  52. DIFF_PROGRAM = $(bindir)/`echo diff | $(edit_program_name)`
  53. NULL_DEVICE = /dev/null
  54. PR_PROGRAM = /bin/pr
  55.  
  56. #### End of system configuration section. ####
  57.  
  58. SHELL = /bin/sh
  59.  
  60. # The source files for all of the programs.
  61. srcs=diff.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c normal.c ifdef.c \
  62.     util.c dir.c memchr.c waitpid.c \
  63.     version.c diff.h regex.c regex.h side.c system.h \
  64.     diff3.c sdiff.c cmp.c error.c xmalloc.c getopt.c getopt1.c getopt.h \
  65.     fnmatch.c fnmatch.h alloca.c
  66. distfiles = $(srcs) README INSTALL NEWS diagmeet.note Makefile.in \
  67.     stamp-h.in config.hin configure configure.in COPYING ChangeLog \
  68.     diff.texi diff.info* texinfo.tex \
  69.     install-sh mkinstalldirs
  70.  
  71. PROGRAMS = cmp diff diff3 sdiff
  72.  
  73. all: $(PROGRAMS) info
  74.  
  75. COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS)
  76.  
  77. .c.o:
  78.     $(COMPILE) $<
  79.  
  80. diff_o = diff.o analyze.o cmpbuf.o dir.o io.o util.o \
  81.     context.o ed.o ifdef.o normal.o side.o \
  82.     fnmatch.o getopt.o getopt1.o regex.o version.o $(ALLOCA) $(LIBOBJS)
  83. diff: $(diff_o)
  84.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff_o) $(LIBS)
  85.  
  86. diff3_o = diff3.o getopt.o getopt1.o version.o $(LIBOBJS)
  87. diff3: $(diff3_o)
  88.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff3_o) $(LIBS)
  89.  
  90. sdiff_o = sdiff.o getopt.o getopt1.o version.o $(LIBOBJS)
  91. sdiff: $(sdiff_o)
  92.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(sdiff_o) $(LIBS)
  93.  
  94. cmp_o = cmp.o cmpbuf.o error.o getopt.o getopt1.o xmalloc.o version.o $(LIBOBJS)
  95. cmp: $(cmp_o)
  96.     $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(cmp_o) $(LIBS)
  97.  
  98. info: diff.info
  99. diff.info: diff.texi
  100.     $(MAKEINFO) $(srcdir)/diff.texi --output=$@
  101.  
  102. dvi: diff.dvi
  103. diff.dvi: diff.texi
  104.     $(TEXI2DVI) $(srcdir)/diff.texi
  105.  
  106. $(diff_o): diff.h system.h
  107. cmp.o diff3.o sdiff.o: system.h
  108. context.o diff.o regex.o: regex.h
  109. cmp.o diff.o diff3.o sdiff.o getopt.o getopt1.o: getopt.h
  110. diff.o fnmatch.o: fnmatch.h
  111. analyze.o cmpbuf.o cmp.o: cmpbuf.h
  112.  
  113. cmp.o: cmp.c
  114.     $(COMPILE) -DNULL_DEVICE=\"$(NULL_DEVICE)\" $(srcdir)/cmp.c
  115.  
  116. diff3.o: diff3.c
  117.     $(COMPILE) -DDIFF_PROGRAM=\"$(DIFF_PROGRAM)\" $(srcdir)/diff3.c
  118.  
  119. sdiff.o: sdiff.c
  120.     $(COMPILE) -DDEFAULT_EDITOR_PROGRAM=\"$(DEFAULT_EDITOR_PROGRAM)\" \
  121.         -DDIFF_PROGRAM=\"$(DIFF_PROGRAM)\" $(srcdir)/sdiff.c
  122.  
  123. util.o: util.c
  124.     $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $(srcdir)/util.c
  125.  
  126. TAGS: $(srcs)
  127.     etags $(srcs)
  128.  
  129. clean:
  130.     rm -f *.o $(PROGRAMS) core
  131.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  132.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  133.  
  134. mostlyclean: clean
  135.  
  136. distclean: clean
  137.     rm -f Makefile config.cache config.h config.log config.status stamp-h
  138.  
  139. realclean: distclean
  140.     rm -f TAGS *.info*
  141.  
  142. install: all installdirs
  143.     for p in $(PROGRAMS); do \
  144.       $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | $(edit_program_name)`; \
  145.     done
  146.     { test -f diff.info || cd $(srcdir); } && \
  147.     for f in diff.info*; do \
  148.       $(INSTALL_DATA) $$f $(infodir)/$$f; \
  149.     done
  150.  
  151. installdirs:
  152.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir)
  153.  
  154. # We need more tests.
  155. check:
  156.     ./cmp cmp cmp
  157.     ./diff diff diff
  158.     ./diff3 diff3 diff3 diff3
  159.     ./sdiff sdiff sdiff
  160.  
  161. uninstall:
  162.     for p in $(PROGRAMS); do \
  163.       rm -f $(bindir)/`echo $$p | $(edit_program_name)`; \
  164.     done
  165.     rm -f $(infodir)/diff.info*
  166.  
  167. configure: configure.in
  168.     cd $(srcdir) && autoconf
  169.  
  170. # autoheader might not change config.hin.
  171. config.hin: stamp-h.in
  172. stamp-h.in: configure.in
  173.     cd $(srcdir) && autoheader
  174.     date > $(srcdir)/stamp-h.in
  175.  
  176. config.status: configure
  177.     ./config.status --recheck
  178.  
  179. # config.status might not change config.h, but it changes stamp-h.
  180. config.h: stamp-h
  181. stamp-h: config.hin config.status
  182.     ./config.status
  183. Makefile: Makefile.in config.status
  184.     ./config.status
  185.  
  186. dist: $(distfiles)
  187.     echo diffutils-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
  188.     rm -rf `cat .fname`
  189.     mkdir `cat .fname`
  190.     -ln $(distfiles) `cat .fname`
  191.     for file in $(distfiles); do \
  192.       [ -r `cat .fname`/$$file ] || cp -p $$file `cat .fname` || exit; \
  193.     done
  194.     tar -chf - `cat .fname` | gzip >`cat .fname`.tar.gz
  195.     rm -rf `cat .fname` .fname
  196.  
  197. # Prevent GNU make v3 from overflowing arg limit on SysV.
  198. .NOEXPORT:
  199.